In known fashion, a computer system executes instructions, which are commonly called software, code or a computer program while these instructions manipulate data stored in memory. These data can for example be variables, pointers, tables, unions or structures. The memory of the computer system contains both data and code at the same time.
Between the processor and the memory of the computer system, a memory management unit, called an MMU, is often incorporated (especially in multitasking systems), which carries out address translation between a virtual address handled by the processor and a physical address in memory.
In known fashion, a virtual address is also sometimes called a “logical address.”
Document U.S. Pat. No. 5,956,751 describes a memory management mechanism. FIG. 2 of this document illustrates perfectly the conventional segmenting and paging mechanisms, particularly used in the ‘x86’ processors.
It is recalled in particular that the memory used by a program can be cut up into segments such as for example a segment of initialized data, a non-initialized data segment, and a code segment.
In addition to this segmentation mechanism, an MMU breaks memory up into pages of fixed or predefined size (often a multiple of a certain size). An indirection mechanism makes a page correspond to a virtual address.
For any memory request, an MMU determines which segment is considered, then determines (most often by means of a mapping table) which page is addressed. Finally, the MMU adds an offset, within the address page, to select the correct memory address.
Such a memory management mechanism poses a certain number of problems due to the very structure of the logical address.
As stated previously, the logical address is made up of a page field, a segment field and an offset field.
These fields do not in any way reflect the architecture of the computer program; in particular, a function can be split among several pages, or a page can contain several functions, at least in part.
It is therefore understood that if an error occurs at the time of execution of a given address, it is excessively difficult to identify the faulty code segment.
To resolve this problem, it is known to use debugging tools capable of recording an execution trace of the program. To be effective, these debuggers must include a large trace memory, an expensive solution. In addition, the analysis of these traces is complicated.
One solution for limiting the risk of error or facilitating debugging consists of statically defining all virtual addresses during compilation.
The person skilled in the art will understand that this solution cannot be considered in a complex environment, wherein it is not known a priori what applications will be executing, which libraries will be in use and what volume of data will be handled by the instance of an application.